3.46 \(\int \frac {(2+3 x+5 x^2)^2}{(3-x+2 x^2)^2} \, dx\)

Optimal. Leaf size=63 \[ \frac {121 (19-7 x)}{184 \left (2 x^2-x+3\right )}+\frac {55}{8} \log \left (2 x^2-x+3\right )+\frac {25 x}{4}+\frac {1859 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{92 \sqrt {23}} \]

[Out]

25/4*x+121/184*(19-7*x)/(2*x^2-x+3)+55/8*ln(2*x^2-x+3)+1859/2116*arctan(1/23*(1-4*x)*23^(1/2))*23^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {1660, 1657, 634, 618, 204, 628} \[ \frac {121 (19-7 x)}{184 \left (2 x^2-x+3\right )}+\frac {55}{8} \log \left (2 x^2-x+3\right )+\frac {25 x}{4}+\frac {1859 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{92 \sqrt {23}} \]

Antiderivative was successfully verified.

[In]

Int[(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^2,x]

[Out]

(25*x)/4 + (121*(19 - 7*x))/(184*(3 - x + 2*x^2)) + (1859*ArcTan[(1 - 4*x)/Sqrt[23]])/(92*Sqrt[23]) + (55*Log[
3 - x + 2*x^2])/8

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {\left (2+3 x+5 x^2\right )^2}{\left (3-x+2 x^2\right )^2} \, dx &=\frac {121 (19-7 x)}{184 \left (3-x+2 x^2\right )}+\frac {1}{23} \int \frac {\frac {163}{4}+\frac {1955 x}{4}+\frac {575 x^2}{2}}{3-x+2 x^2} \, dx\\ &=\frac {121 (19-7 x)}{184 \left (3-x+2 x^2\right )}+\frac {1}{23} \int \left (\frac {575}{4}-\frac {11 (71-115 x)}{2 \left (3-x+2 x^2\right )}\right ) \, dx\\ &=\frac {25 x}{4}+\frac {121 (19-7 x)}{184 \left (3-x+2 x^2\right )}-\frac {11}{46} \int \frac {71-115 x}{3-x+2 x^2} \, dx\\ &=\frac {25 x}{4}+\frac {121 (19-7 x)}{184 \left (3-x+2 x^2\right )}+\frac {55}{8} \int \frac {-1+4 x}{3-x+2 x^2} \, dx-\frac {1859}{184} \int \frac {1}{3-x+2 x^2} \, dx\\ &=\frac {25 x}{4}+\frac {121 (19-7 x)}{184 \left (3-x+2 x^2\right )}+\frac {55}{8} \log \left (3-x+2 x^2\right )+\frac {1859}{92} \operatorname {Subst}\left (\int \frac {1}{-23-x^2} \, dx,x,-1+4 x\right )\\ &=\frac {25 x}{4}+\frac {121 (19-7 x)}{184 \left (3-x+2 x^2\right )}+\frac {1859 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{92 \sqrt {23}}+\frac {55}{8} \log \left (3-x+2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 63, normalized size = 1.00 \[ -\frac {121 (7 x-19)}{184 \left (2 x^2-x+3\right )}+\frac {55}{8} \log \left (2 x^2-x+3\right )+\frac {25 x}{4}-\frac {1859 \tan ^{-1}\left (\frac {4 x-1}{\sqrt {23}}\right )}{92 \sqrt {23}} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^2,x]

[Out]

(25*x)/4 - (121*(-19 + 7*x))/(184*(3 - x + 2*x^2)) - (1859*ArcTan[(-1 + 4*x)/Sqrt[23]])/(92*Sqrt[23]) + (55*Lo
g[3 - x + 2*x^2])/8

________________________________________________________________________________________

fricas [A]  time = 0.97, size = 78, normalized size = 1.24 \[ \frac {52900 \, x^{3} - 3718 \, \sqrt {23} {\left (2 \, x^{2} - x + 3\right )} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) - 26450 \, x^{2} + 29095 \, {\left (2 \, x^{2} - x + 3\right )} \log \left (2 \, x^{2} - x + 3\right ) + 59869 \, x + 52877}{4232 \, {\left (2 \, x^{2} - x + 3\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^2,x, algorithm="fricas")

[Out]

1/4232*(52900*x^3 - 3718*sqrt(23)*(2*x^2 - x + 3)*arctan(1/23*sqrt(23)*(4*x - 1)) - 26450*x^2 + 29095*(2*x^2 -
 x + 3)*log(2*x^2 - x + 3) + 59869*x + 52877)/(2*x^2 - x + 3)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 52, normalized size = 0.83 \[ -\frac {1859}{2116} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) + \frac {25}{4} \, x - \frac {121 \, {\left (7 \, x - 19\right )}}{184 \, {\left (2 \, x^{2} - x + 3\right )}} + \frac {55}{8} \, \log \left (2 \, x^{2} - x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^2,x, algorithm="giac")

[Out]

-1859/2116*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 25/4*x - 121/184*(7*x - 19)/(2*x^2 - x + 3) + 55/8*log(2
*x^2 - x + 3)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 51, normalized size = 0.81 \[ \frac {25 x}{4}-\frac {1859 \sqrt {23}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {23}}{23}\right )}{2116}+\frac {55 \ln \left (2 x^{2}-x +3\right )}{8}+\frac {-\frac {847 x}{368}+\frac {2299}{368}}{x^{2}-\frac {1}{2} x +\frac {3}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2+3*x+2)^2/(2*x^2-x+3)^2,x)

[Out]

25/4*x+11/4*(-77/92*x+209/92)/(x^2-1/2*x+3/2)+55/8*ln(2*x^2-x+3)-1859/2116*23^(1/2)*arctan(1/23*(4*x-1)*23^(1/
2))

________________________________________________________________________________________

maxima [A]  time = 0.97, size = 52, normalized size = 0.83 \[ -\frac {1859}{2116} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) + \frac {25}{4} \, x - \frac {121 \, {\left (7 \, x - 19\right )}}{184 \, {\left (2 \, x^{2} - x + 3\right )}} + \frac {55}{8} \, \log \left (2 \, x^{2} - x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^2,x, algorithm="maxima")

[Out]

-1859/2116*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 25/4*x - 121/184*(7*x - 19)/(2*x^2 - x + 3) + 55/8*log(2
*x^2 - x + 3)

________________________________________________________________________________________

mupad [B]  time = 3.40, size = 52, normalized size = 0.83 \[ \frac {25\,x}{4}+\frac {55\,\ln \left (2\,x^2-x+3\right )}{8}-\frac {\frac {847\,x}{368}-\frac {2299}{368}}{x^2-\frac {x}{2}+\frac {3}{2}}-\frac {1859\,\sqrt {23}\,\mathrm {atan}\left (\frac {4\,\sqrt {23}\,x}{23}-\frac {\sqrt {23}}{23}\right )}{2116} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x + 5*x^2 + 2)^2/(2*x^2 - x + 3)^2,x)

[Out]

(25*x)/4 + (55*log(2*x^2 - x + 3))/8 - ((847*x)/368 - 2299/368)/(x^2 - x/2 + 3/2) - (1859*23^(1/2)*atan((4*23^
(1/2)*x)/23 - 23^(1/2)/23))/2116

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 61, normalized size = 0.97 \[ \frac {25 x}{4} + \frac {2299 - 847 x}{368 x^{2} - 184 x + 552} + \frac {55 \log {\left (x^{2} - \frac {x}{2} + \frac {3}{2} \right )}}{8} - \frac {1859 \sqrt {23} \operatorname {atan}{\left (\frac {4 \sqrt {23} x}{23} - \frac {\sqrt {23}}{23} \right )}}{2116} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**2+3*x+2)**2/(2*x**2-x+3)**2,x)

[Out]

25*x/4 + (2299 - 847*x)/(368*x**2 - 184*x + 552) + 55*log(x**2 - x/2 + 3/2)/8 - 1859*sqrt(23)*atan(4*sqrt(23)*
x/23 - sqrt(23)/23)/2116

________________________________________________________________________________________